package com.day17me.java;

import java.util.ArrayList;
import java.util.List;

public class ListTest3 {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add("苹果");
        list.add("菠萝");
        list.add("柠檬");
        System.out.println(list);
        list.set(1,"西红柿");
        System.out.println(list);
        int index = list.indexOf("西红柿");
        System.out.println(index);


    }
}
